﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using Dinamico.Models;

namespace Dinamico.Service
{
    public interface IBasketService
    {
        /// <summary>
        /// Add Article into the Basket.
        /// Checking uniquenes of Article ID and SizeName.
        /// If not unique, then summarize the Basket-Article in <see cref="List"/> and <paramref name="inputArticle"/> Quantities.
        /// </summary>
        /// <param name="article"></param>
        BasketArticleModel Add(ArticleInputModel inputArticle);

        /// <summary>
        /// Gert the inner BasketArticleModel List.
        /// </summary>
        List<BasketArticleModel> List { get; }

  
        /// <summary>
        /// Remove an Article from the Article List.
        /// </summary>
        /// <param name="basketArticle"></param>
        void Remove(BasketArticleModel basketArticle);
        /// <summary>
        /// Remove ALL articles from the List.
        /// </summary>
        void RemoveAll();
        /// <summary>
        /// Remove articles by Id in Basket.
        /// </summary>
        /// <param name="basketArticleID"></param>
        void RemoveById(string basketArticleID);

        /// <summary>
        /// Update Quantity of the specified Article in the Basket.
        /// </summary>
        /// <param name="article"></param>
        void UpdateQuantity(BasketArticleModel basketArticle);

        /// <summary>
        /// Check if there are any Articles in the Basket.
        /// </summary>
        bool IsEmpty { get; }

        /// <summary>
        /// Check if there is an Article with the specified <paramref name="basketArticleId"/>.
        /// </summary>
        /// <param name="basketArticleId"></param>
        /// <returns></returns>
        bool ContainsArticle(string basketArticleId);

        void Update(BasketItemInputModel article);

        List<BasketItemModel> BasketListToBasketItemModels();//TODO: this is not good
    }


}
